# -*- coding: utf-8 -*-
import json
import sys
import time
import pymysql
import logging

from urllib import parse

import pandas as pd
import pymysqlpool
pymysqlpool.logger.setLevel('DEBUG')
config={'host':'118.31.229.195', 'user':'douyin', 'password':'douyin123456', 'database':'douyin'}

# 创建一个连接池，其中有10个连接
pool1 = pymysqlpool.ConnectionPool(size=10, name='pool1', **config)

# 获取信息
def get_info():
    conn1 = pool1.get_connection()
    with conn1 as cur:
        cur.execute("SELECT * FROM douyin_video where id = 29778")
    res = cur.fetchone()
    return res
str1 = get_info()
print(str1)
